package kgame5.kengine.gameunit.parts {
import kgame5.k3d.core.obj3d.node3d.Node3D;
import kgame5.k3d.core.obj3d.node3d.impl.group3d.Group3D;
import kgame5.kengine.events.GUViewEvent;
import kgame5.kengine.events.SendCommandEvent;

import flash.events.EventDispatcher;

/**
 * @author kk
 */
public class GUViewComp extends EventDispatcher{
	
	protected var md_g:Group3D;//这个做成个group吧，因为里面要包含不少别的东西呢
	
	//###########这个是要被继承的
	public function GUViewComp(){
		//这里生成md_g丙组装好
	}
	
	public function dispose():void{
		
	}
	
	//#这个是要被继承的
	public function getMD():Node3D{
		return md_g;
	}
	
	public function update():void{
		
	}
	
	//==============向GameUnit发送事件.参考pureMVC======================
	protected function sendNotify(name:String,data:Object):void{
		this.dispatchEvent(new GUViewEvent(name,data));
	}
	
	//==================通知GUActor对外发送command=====================
	protected function sendCommand(commandName:String,data:Object):void{
		this.dispatchEvent(new SendCommandEvent(commandName,data));
	}
}
}
